package day1;

/**
 * @author pacai
 * @version 1.0
 */
public class no_pTop {
    public static int no_P(){
        //按照0.84概率返回1，固定概率返回01
        return Math.random() < 0.84 ? 1 : 0;
    }

    //等概率返回01
    public static int to_P(){
        int ans = 0;
        do{
            ans = no_P();
        }while (ans == no_P());
        return ans;
    }
}
